<template>
  <div>
    <van-nav-bar
      :z-index="999"
      :fixed="true"
      left-arrow
      @click-left="onClickLeft"
      :placeholder="true"
      title="全部班型"
    ></van-nav-bar>
    <div class="in-panel-classs">
      <van-cell
        class="class-cell"
        v-for="(item, i) in classlists"
        :key="i"
        @click="href('/BanksDetails',item.id)"
      >
        <template #icon>
          <div class="cl-style">{{item.stageType}}</div>
        </template>
        <template #title>
          <div class="cl-head justify">
            <div class="cl-tit">{{ item.stageName }}</div>
            <div class="cl-price">￥{{ item.classPriceTotal }}</div>
          </div>
          <div class="cl-attr">
            <div class="cl-attr">
              <span>总课时:</span>
              <span>{{item.classNumTotal}}</span>
            </div>
          </div>
        </template>
      </van-cell>
    </div>
  </div>
</template>

<script>
import { DetailsBanks } from "../../assets/js/api/apply";
export default {
  name: "AllBanks",
  data() {
    return {
      classlists: []
    };
  },

  created() {
     let dsBridge = require("dsbridge");
         dsBridge.call("goBack","", function() {
           history.go(-1);
         });
    DetailsBanks(this.$route.params.lid).then(res => {
      // console.log(res);
      this.classlists = res.data;
    });
  },

  methods: {
    href(url, id) {
      // let lid = this.$route.params.lid;
      this.$router.push({
        path: `${url}/${id}`
      });
    },

    onClickLeft() {
      this.$router.go(-1);
    }
  },
    
};
</script>

<style>
</style>